home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / J-Dylan info / DIRMJ - Common Ground / Chap.1-7 (.txt) < prev    next >
Encoding:
Common Ground  |  1994-12-13  |  578.3 KB  |  2,300 lines  |  [CGDC/CGVM]

  1. Palatino
  2. Introduction)
  3. Manual Notation)
  4. Roman
  5. (Bold)
  6. Courier
  7. Courier
  8. {...}
  9. number
  10. <number>
  11. string
  12. <string>
  13.  Dylan
  14. Courier
  15. Courier
  16. Courier
  17. Courier
  18. Dylan
  19. format
  20. print
  21. Dylan
  22.  Dylan
  23.  Dylan
  24. Palatino
  25. Background and Goals)
  26. Dylan
  27. Dylan
  28. Dylan
  29. Dylan
  30. Dylan
  31. 8    Smalltalk
  32. Dylan
  33. C, C++,Pascal
  34. Dylan
  35.     Smalltalk
  36. Scheme
  37. Common Lisp
  38.  Lisp
  39. )H    Smalltalk
  40. Dylan
  41. Dylan
  42. Language Overview)
  43. Dylan
  44.  Dylan
  45. )F3 CLOS (Common Lisp Object System), Oak Lisp, EuLisp
  46. Palatino
  47. class heterarchy)
  48. Courier
  49. <object>
  50. direct superclasses)
  51. <object>
  52. subclasses
  53. (superclasses)
  54. <object>
  55. Dylan
  56. direct
  57.     instance)
  58. indirect instance) 
  59. Dylan
  60. <object>
  61. general instance)
  62. Dylan
  63. Abstract Class)
  64. concrete
  65. class)
  66. Instantiable 
  67. uninstantiable class)
  68.  Class)
  69. (Sealed Class)
  70. X(open class)
  71. (Primary Class)
  72. (free class)
  73. (Functions)
  74.  Dylan
  75. Dylan
  76.  Dylan
  77. <function>
  78. eterarchy 
  79.  (DAG, directed acyclic graph)
  80. )<    hierarchy
  81.  Dylan
  82. Dylan
  83.   heterarchy 
  84. <function>, <generic-function>,<method>
  85. Palatino
  86. (method)
  87. specializers)
  88. applicable)
  89. gener
  90. ic function)
  91. Dylan
  92. Dylan
  93.     Smalltalk
  94. first class)
  95. Palatino
  96. (Syntax)
  97. Lexical Notation)
  98. Dylan
  99. Courier
  100. ! & * < = > | ^ $ % @ _ - + ~ 
  101. )l    - + ~ ? /
  102. )0#+ - * / - = == < > <= >= ~= ~ & | ^
  103. define method
  104. X (Numeric Classes)
  105. #x1f4e
  106. Dylan
  107. "abc"
  108. #"Hello"
  109.  (Characters and Symbols)
  110. Courier
  111. Hello:
  112. Palatino
  113.  (Characters and Symbols)
  114. #(1, 2, 3)
  115. #[1, 2, 3]
  116.     /* ... */
  117. #rest
  118. #next
  119.     #all-keys
  120. #rest
  121. #next
  122.     #all-keys
  123. (Naming Conventions)
  124. Dylan
  125. <window>
  126. <object>
  127. <character>
  128. <numb
  129. <stream>
  130. <list>
  131. *parse-level*
  132. *incremental-search-string*
  133. *machine-state*
  134. *window-count*
  135. Courier
  136. $end-of-file
  137. 0    subclass?
  138. even?
  139. 0    instance?
  140. Palatino
  141. reverse!
  142. reverse
  143. sort!
  144. getters)
  145. setters)
  146. -sette
  147. Getter 
  148. Setter 
  149. window-position
  150. window-position-setter
  151. table-size
  152. table-size-setter
  153. window-color
  154. window-color-setter
  155.     my-window
  156. color
  157. green
  158. &window-color-setter (green, my-window)
  159. my-window.window-color := green
  160. (Expressions)
  161. Dylan
  162. (expressions)
  163. (outer expression)
  164. (top-level expression)
  165. begin
  166. begin
  167. Palatino
  168. (syntax forms)
  169. (Literal Constants)
  170. Courier
  171. "abc"
  172. "abc"
  173.  foo:
  174.  #(1, 2, 3)
  175. #(1, 2, 3)
  176. (Equality Comparisons)
  177. Variable References)
  178. Dylan
  179. define variable
  180. define method
  181. <window>
  182. {the class <window>}
  183.  concatenate
  184. 0"{the generic function concatenate}
  185. " define variable my-variable = 25;
  186. my-variable
  187.  my-variable
  188.  begin
  189.     let x = 50;
  190.     x + x;
  191. Courier
  192.   end;
  193. Palatino
  194. Dylan
  195. (first class)
  196. Function Calls)
  197.         expression
  198. expression
  199. expression
  200.     factorial
  201. factorial(x, y)
  202. Dylan
  203. Scheme
  204. Common Lisp
  205.  (method(x) x + 1 end) (99)
  206. Syntax Forms)
  207. syntax form)
  208. syntax operators)
  209. efine variable
  210. method
  211. define variable
  212. define variable
  213. method
  214. method
  215. define variable foo = 3;
  216. argument.function
  217. argument
  218. function
  219. Courier
  220. %method (a :: <number>, b :: <number>)
  221.    list (a - b, a + b);
  222. end method;
  223. Palatino
  224. variable := 12;
  225. macro 
  226. (macros)
  227. ) Dylan
  228. (Special forms
  229. method
  230. (definitions
  231. define method
  232. define 
  233. variable
  234. (Statement bodies)
  235.  (implicit bodies)
  236. begin
  237. begin
  238. [Special Form]
  239. Symbol
  240.   values
  241. body 
  242. begin
  243. begin
  244. #  close(airlock.outer-door);    // 
  245. 0#  pressurize(airlock);          // 
  246. Courier
  247. #  open(airlock.inner-door);     // 
  248. begin
  249. if (moon-phase == #"full")
  250. #  wolf-form(werewolf);          // 
  251. 0#  howl-at-moon(werewolf);       // 
  252.   human-form(werewolf);
  253. end if;
  254. Palatino
  255. Semicolons)
  256. Special function call syntax)
  257. (Infix Operators)
  258. left-associative)
  259. (right-associative)
  260. unary
  261. unary
  262. binary
  263. binary
  264. binary
  265. binary
  266. Courier
  267. binary
  268. binary
  269. equality
  270. binary
  271. (identity)
  272. binary
  273. binary
  274. binary
  275. binary
  276. binary
  277. binary
  278. binary
  279. binary
  280. Palatino
  281. (Equality Comparisons)
  282. Dylan
  283. first class)
  284. define method
  285.  op arg
  286. (Slot Reference)
  287. Dylan
  288. argument.function
  289. function
  290. argument
  291.     argument 
  292. )T    function 
  293. moo.goo.gai.pan
  294.  america.capital
  295. "Washington, D.C."
  296. / me.mother.current-husband.favorite-child == me
  297. Dylan
  298. Palatino
  299.  (Array Reference)
  300. Dylan
  301. Courier
  302. foo[i]
  303. element(foo, i)
  304. foo[i
  305. , ... i
  306. aref (foo, i
  307. , ... i
  308. element
  309. " define constant vect = #[7, 8, 9]
  310. defined vect
  311.  vect[0]
  312. sequence[arg
  313. , arg
  314. sequence
  315. element
  316.  in Dylan module>
  317.  in Dylan module>
  318. Dylan
  319. Syntax of Dylan Files)
  320. Dylan
  321.  (Dylan source code file)
  322.  Dylan
  323. header)
  324. body)
  325. *    ISO 646 7
  326. Palatino
  327. Courier
  328. module:
  329. module-name
  330. [Header keyword]
  331. author:
  332. arbitrary text
  333. [Header keyword]
  334. copyright: 
  335. arbitrary text 
  336. [Header keyword]
  337.     version: 
  338. arbitrary text
  339. [Header keyword]
  340.  Dylan
  341. module:
  342. )`    quickdraw
  343. author: 
  344. J. Random Rect
  345.         
  346. )`1Linear Wheels, Inc., "Where quality is a slogan!"
  347.         
  348. rect@linear.com
  349. 0<copyright: (c) 1993 Linear Wheels, Inc., All rights reserved
  350.     version: 
  351. .3 alpha (not fully tested)
  352. 0"define constant $black-color = ...
  353. Palatino
  354.  (Variables)
  355. Dylan
  356. lexical variables)
  357. module variables)
  358. environment)
  359. Courier
  360.  (Module Variables)
  361. define variable
  362. bindings
  363. [Definition]
  364. define variable
  365. bindings
  366. variable
  367. variable
  368.  }*  [ 
  369. #rest
  370. rest-variable-name 
  371. variable
  372. variable-name
  373. variable-name
  374. )0    variable-
  375. names 
  376. rest-variable
  377. -name 
  378. bindings
  379. bindings
  380. (Checking Types)
  381. (Binding Multiple Values)
  382. define variable foo = 10;
  383.  foo + foo;
  384. define constant
  385. bindings
  386. [Definition]
  387. define constant
  388. define 
  389. variable
  390. define 
  391. class
  392. define generic
  393. define method
  394. Courier
  395. define generic
  396. define method
  397. Palatino
  398.  (Lexical Variables)
  399. bindings   
  400. [Special Form]
  401. bindings
  402. variable
  403. variable
  404.  }*  [ 
  405. #rest
  406. rest-variable-name 
  407. variable
  408. variable-name
  409. variable-name
  410. variable-names 
  411. rest-variable-name 
  412. bindings
  413. bindings
  414. (Checking Types) 
  415.  (Binding Multiple Values) 
  416.  begin
  417.     let foo = 35;
  418.     foo + foo
  419.   end
  420. (shadow)
  421. define variable foo = 10;
  422.  begin 
  423.     let foo = 20;
  424.     let foo = 50;
  425.     foo + foo
  426.   end
  427. Courier
  428. local
  429. block
  430. Palatino
  431.  (Checking Types)
  432. define variable
  433. variable-name 
  434. type 
  435. variable-name
  436.  Dylan
  437. <type>
  438. types
  439. variable
  440. variable
  441. define variable
  442. begin
  443. 0"    let x :: <integer> = sqrt (2);
  444.     x
  445.   end
  446. 9error: 1.4142135623730951 is not an instance of <integer>
  447. &define variable foo :: <integer> = 10;
  448. oo := sqrt (2)
  449. 9error: 1.4142135623730951 is not an instance of <integer>
  450. Binding Multiple Values)
  451. Dylan
  452.  (multiple values)
  453. values
  454. let,define variable,
  455. define constant
  456. bindings
  457. bindings
  458. Palatino
  459. variable
  460. Courier
  461. variable
  462.  }*  [ 
  463. #rest
  464. rest-variable-name 
  465. values
  466. #rest
  467. the-values
  468. Symbol
  469.  the-values
  470. [Function]
  471. the-values
  472. values(1, 2, 3);
  473. define variable,
  474. define constant
  475.     variables
  476.     variables
  477. begin
  478. 0+    let (foo, bar, baz) = values (1, 2, 3);
  479.     list (foo, bar, baz)
  480.   end
  481. #(1, 2, 3)
  482. 2 define method opposite-edges (center :: <number>,
  483. 04                                radius :: <number>);
  484. ,    let (min, max) = edges (center, radius);
  485.     values (max, min);
  486.   end method;
  487. opposite-edges
  488.  opposite-edges (100, 2);
  489. *    variables
  490.     variables
  491. variable
  492. )`    variables
  493. rest-variable 
  494. )|    sequence)
  495. rest-variable 
  496. rest-
  497. *    variable 
  498. Dylan
  499. begin
  500. 0&    let (#rest nums) = edges (100, 2);
  501.         nums;
  502.   end
  503. #(98, 102)
  504. rest-variable
  505. rest-variable
  506. Courier
  507. begin
  508.     let x = 10;
  509.     let y = 20;
  510.     let (x, y) = values (y, x);
  511.     list (x, y);
  512.   end
  513.     #(20, 10)
  514. Palatino
  515. (Assignment)
  516. Dylan
  517. place  
  518.     new-value
  519. Symbol
  520.     new-value
  521. [Special Form]
  522.     new-value
  523. place
  524. place
  525. )l    new-value
  526.     new-value
  527. place
  528. Dylan
  529. place
  530. place
  531. )T    new-value
  532. place
  533. ,    new-value
  534. define variable foo = 10;
  535.  foo             // 
  536. 10                
  537.  foo := 10 + 10;
  538. (Extended form)
  539. place
  540. extended form
  541. +define variable foo = vector (10, 6, 8, 5);
  542. Courier
  543.  element(foo, 2)
  544.  element(foo, 2) := "bar"
  545. "bar"
  546. #[10, 6, "bar", 5]
  547. Palatino
  548. u    , ... arg
  549. ) := 
  550. )#    new-value
  551. -setter ( 
  552. new-value, arg
  553.     , ... arg
  554. (functional) 
  555. function-name(arg
  556. , ..., arg
  557. ) := new-value
  558.  ... arg
  559.     new-value
  560. function-name
  561. function-name-setter
  562. >(Extended form using array reference or slot reference syntax)
  563. foo[2] := "quux"
  564. element (foo, 2) := "quux"
  565. element-setter ("quux", foo, 2)
  566. argument.function-name := value
  567. argument
  568. value
  569. function-name
  570. function-name-setter
  571. implicit element
  572. sequence[arg
  573. , arg
  574. ] := value
  575. Courier
  576. sequence
  577. Palatino
  578. value
  579. element-setter
  580. Palatino
  581. (Control Constructs)
  582. (True and False)
  583. Dylan
  584. Courier
  585. [Object]
  586. Dylan
  587. [Object]
  588. thing
  589. Symbol
  590. boolean
  591. [Function]
  592. thing
  593. (Conditionals)
  594. consequent
  595. elseif
  596. elseif-test
  597. elseif-consequent
  598.     alternate
  599. values
  600. [Special Form]
  601. consequent
  602. elseif
  603. elseif-test
  604. elseif-test
  605. elseif-consequent
  606. elseif-test
  607. elseif-test
  608. )H    alternate
  609. )H    alternate
  610.  Lisp
  611. Palatino
  612. )0    alternate
  613. Courier
  614. consequent
  615. elseif-consequent
  616.     alternate
  617. consequent
  618. elseif-
  619. consequent
  620. )$    alternate
  621. &define method test (thing :: <object>)
  622.     if (thing)
  623.       #t
  624.     else
  625.       #f
  626.     end if
  627.   end method;
  628.  test ("hello")
  629.  test (#t)
  630.  test (#f)
  631. define method show-and-
  632. tell (thing :: <object>);
  633.      if (thing)
  634.        print (thing);
  635.            #t
  636.          else
  637.            #f
  638.      end if
  639.   end method;
  640. show-and-tell
  641.  show-and-tell("hello")
  642. hello
  643. unless
  644. [Macro]
  645. unless
  646. Symbol
  647. values
  648. unless
  649. unless(detect-gas? (nose))
  650.     light(match)
  651. end unless
  652. Courier
  653.               
  654. Palatino
  655. [Macro]
  656. otherwise => 
  657. otherwise-body
  658. Symbol
  659.   values
  660. body 
  661. body 
  662. body 
  663.     otherwise
  664.    player1.money <= 0
  665.      => end-game(player1);
  666.    player2.money <= 0
  667.      => end-game(player2);
  668.    otherwise
  669.      => move(player1);
  670.         move(player2);
  671.     end case;
  672. select
  673. target-form
  674. test 
  675. [Macro]
  676. match
  677. ...   
  678. match-
  679. match
  680.   ...   
  681. match-
  682. otherwise =>
  683. otherwise-body
  684. select
  685.   values
  686. match-list
  687. l    otherwise
  688. body 
  689. select
  690. target-form
  691. target value)
  692. match 
  693. Courier
  694. Palatino
  695. body 
  696. body 
  697. body)
  698.     otherwise
  699. )`    otherwise
  700. select
  701. !select ( career-choice(student) )
  702. rt:, music:, drama:
  703. 0!     => "Dont quit your day job";
  704. &   literature:, history:, linguistics:
  705. %     => "That really is fascinating";
  706.     science:, math:, engineering:
  707. #     => "Say, can you fix my VCR?";
  708. "   otherwise => "I wish you luck";
  709. end select;
  710.     instance?
  711. Dylan
  712. select
  713. Common Lisp
  714. typecase
  715. 0!select ( my-object by instance? )
  716. 8  <window>, <view>, <rectangle> => "a graphical object";
  717. 9  <number>, <string>, <list> => "a computational object";
  718.   otherwise => "I dont know";
  719. end select
  720. form1
  721. form2
  722. Symbol
  723.   values
  724. [Macro]
  725.  (or) 
  726. forms
  727. form1
  728. form2
  729. form1
  730. form2
  731. form1 
  732.  form2
  733.   values
  734. [Macro]
  735.  (and) 
  736. forms
  737. form1
  738. form2
  739. form1
  740. form2
  741. Palatino
  742. (Iteration Constructs)
  743. Courier
  744. while
  745. [Macro]
  746. while
  747. Symbol
  748. while
  749. while
  750. until
  751. [Macro]
  752. until
  753. until
  754. until
  755. clauses 
  756. [Macro]
  757.      
  758. until
  759. while
  760. end-test
  761. finally
  762. result-body
  763. value
  764. clauses
  765. clause
  766. iteration variable)
  767. end-test
  768. clauses
  769. (explicit step clauses)
  770. (collection clauses
  771. numeric clauses
  772.  (Explicit step clauses)
  773. variable
  774. variable
  775. init-value
  776. next-value
  777.  (Collection clauses)
  778. variable
  779. variable
  780. collection
  781. forward-iteration-protocol
  782. Palatino
  783.  (Numeric clauses)
  784. Courier
  785. variable
  786. variable
  787. start
  788.                    
  789. above
  790. below
  791. bound
  792.            
  793.     increment
  794. init-value
  795. collection
  796. collection
  797. start
  798. bound
  799. H    increment
  800.     increment
  801.     variable 
  802. init-value
  803. type 
  804. init-value
  805. )l    variable 
  806. start
  807. type 
  808. start
  809. bound 
  810. bound 
  811. increment 
  812. increment 
  813. )D    variable 
  814. bound
  815. )N    variable 
  816. bound
  817. above
  818. )D    variable 
  819. bound
  820. )H    variable 
  821. bound
  822. below
  823. )D    variable 
  824. bound
  825. )H    variable 
  826. bound
  827.     variable 
  828. type 
  829. Palatino
  830. end-test
  831. Courier
  832. end-test
  833. while
  834. end-test
  835. until
  836. , go to 
  837. next-value
  838. )`    variable 
  839.     increment
  840. type 
  841. result-body
  842. result-body 
  843. result-body 
  844. result-body
  845. result-body
  846. +for ( thing = first-thing then next(thing),
  847.       until done?(thing) )
  848.   do-some(thing)
  849. *#$for (j :: <integer> from 0 to height
  850. 0&  for (i :: <integer> from 0 to width)
  851.    erase(i,j);
  852.    plot (i,j);
  853.   end for;
  854. end for;
  855. for (city in olympic-cities,
  856.      year from start-year by 4)
  857. #  schedule-olympic-game(city, year)
  858.   finally notify(press);
  859.           sell(tickets);
  860. Courier
  861. for (i from 0 below 100,
  862.      zombies from 0 below 100,
  863. $     normals from 100 above 0 by -1)
  864. %   population[i] := zombies + normals
  865. Palatino
  866. (Non-local Exits)
  867. block
  868. exit-var
  869. [Special Form]
  870. cleanup
  871. cleanup-clause
  872.     exception
  873. exception-clause
  874. block
  875. Symbol
  876. values
  877. block
  878. block
  879. cleanup-clauses
  880. cleanup-clauses
  881. cleanup-clauses
  882. exception-clauses
  883. block
  884. exit-var
  885. clauses
  886. exit-var
  887. (exit procedure)
  888. clause
  889.  block
  890. (non-local 
  891. exit)
  892. cleanup-clauses
  893. body 
  894. block
  895. cleanup-clauses
  896.  block
  897. block (return)
  898.   open-files();
  899.   ...
  900.   if (error)
  901.     return(#f);
  902.       end if;
  903.   ...
  904.   result
  905. cleanup
  906.   close-files();
  907.     end block
  908. Palatino
  909. cleanup-clauses
  910. Courier
  911. block
  912. block
  913. cleanup-clauses
  914. +Restrictions on the use of exit procedures)
  915. (establishing block
  916.  block
  917. lexical body)
  918. block
  919. block
  920. ? define constant foo =
  921.     block (bar)
  922.        method (n) bar(n) end;
  923.     end block;
  924. ? foo(5)
  925. (intervening blocks
  926. cleanup
  927. cleanup
  928. cleanup
  929. cleanup
  930. Palatino
  931. (Comparisons)
  932. Dylan
  933. identity function
  934. equality
  935.  identity function
  936. (Other Operations)
  937.  identity 
  938. Courier
  939.     protocol)
  940. (Identity):
  941. (Transitivity):
  942. (Trichotomy):
  943.       b), (a 
  944.  b), (b 
  945. (Equality Comparisons)
  946.     object1  
  947. object2
  948. Symbol
  949.       boolean
  950.     [Function
  951. object1
  952. object2
  953. computationally
  954. equivalent
  955. )86) 
  956. Dylan
  957. (a < b)
  958. ~(b < a)
  959.  (antireflexivity )
  960. (a == b)
  961.     ~(a < b))
  962. (a = b)
  963. (b = 
  964. IEEE 
  965. Dylan
  966. IEEE 
  967. (immediate 
  968. value)
  969.     (mutable)
  970.     ,)#!
  971. Palatino
  972. object1 
  973. Courier
  974. object2
  975. Symbol
  976.       boolean
  977. [Generic Function]
  978. key-test
  979. key-test
  980. tails 
  981.     object1  
  982. object2
  983.       boolean
  984. [Function]
  985. object1
  986. object2
  987. (Magnitude Comparisons)
  988.     object1  
  989. object2
  990.       boolean
  991. [Generic Function]
  992. (prefix)
  993.     object1  
  994. object2
  995.       boolean
  996. [Function]
  997. object
  998. object1
  999. object2
  1000. Courier
  1001. Palatino
  1002. object1 
  1003. object2
  1004. Symbol
  1005.       boolean
  1006. [Function]
  1007. object
  1008. object1
  1009. object2
  1010.     object1  
  1011. object2
  1012.       boolean
  1013. [Function]
  1014. object
  1015. object1 
  1016. object2
  1017. Palatino
  1018. (Functions)
  1019. (Function Defining Forms)
  1020. %(Generic Functions and G. F. Methods)
  1021. Courier
  1022. fine generic
  1023. define 
  1024. method
  1025. define generic
  1026. define generic
  1027. define 
  1028. method
  1029. define
  1030. adjectives
  1031. generic
  1032. name  parameter-list 
  1033. [Definition]
  1034. define generic
  1035. adjectives
  1036. adjectives
  1037. sealed
  1038. adjectives
  1039. Controlling Dynamism)
  1040. parameter-list
  1041. parameter-list
  1042. (required pa
  1043. )B    rameters)
  1044. congruent)
  1045. (Parameter Lists)
  1046. define method
  1047. define 
  1048. adjectives
  1049. method 
  1050. name   parameter-list 
  1051. [Definition]
  1052.        
  1053. implicit-body 
  1054. method
  1055. name 
  1056. define method
  1057. define generic
  1058. define method
  1059. Palatino
  1060. (Parameter Lists)
  1061. adjectives 
  1062. adjectives
  1063. Courier
  1064. sealed
  1065. adjectives
  1066. (Controlling 
  1067.     Dynamism)
  1068. parameter-list
  1069. (Parameter Lists)
  1070. implicit-body
  1071. implicit-body 
  1072. implicit-body
  1073. double
  1074. double
  1075. (define method double (thing :: <number>)
  1076.     thing + thing;
  1077.   end method;
  1078. double
  1079.  double
  1080. {the generic function double}
  1081.  double(10)
  1082. double
  1083. <number>
  1084. <number>
  1085. double
  1086. double("the rain in Spain.")
  1087. 0<error: no method for {the generic function double} was found
  1088. /       for the arguments ("the rain in Spain.")
  1089. double
  1090. *define method double (thing :: <sequence>)
  1091.     concatenate (thing, thing);
  1092.   end method;
  1093. double
  1094.  double("the rain in Spain.")
  1095. 0&"the rain in Spain.the rain in Spain."
  1096. Palatino
  1097. (Bare Methods)
  1098. Dylan
  1099. Courier
  1100. method
  1101. method
  1102. parameter-list 
  1103. [Special Form]
  1104. implicit-body
  1105. method
  1106. Symbol
  1107.   method
  1108. method
  1109. method
  1110. method
  1111. parameter-list
  1112. implicit-body 
  1113. implicit-body
  1114. parameter-list
  1115. method
  1116. (Parameter Lists)
  1117.  method(num1, num2)
  1118.     num1 + num2
  1119.   end method
  1120. {an anonymous method}
  1121. // SORT 
  1122.  sort(person-list,
  1123.        method(person1, person2)
  1124. #          person1.age < person2.age
  1125.        end method)
  1126.  begin
  1127. 04    let double = method(number) number + number end;
  1128.     double(double(10))
  1129.   end
  1130. double
  1131. double
  1132. / define method double (my-method :: <function>)
  1133.     method (#rest args)
  1134.       apply (my-method, args);
  1135.       apply (my-method, args);
  1136.       #f
  1137.     end method
  1138.   end method;
  1139. Courier
  1140. double
  1141. , define constant print-twice = double(print)
  1142. print-twice
  1143.  print-twice
  1144. {an anonymous method}
  1145. & print-twice("The rain in Spain. . .")
  1146. 0,The rain in Spain. . .The rain in Spain. . .
  1147.  print-twice(55)
  1148. define method
  1149. local
  1150. Palatino
  1151. method-spec
  1152.  , method-spec
  1153. [Special Form]
  1154. local
  1155. self-recursive
  1156. mutually-recursive
  1157. method-spec
  1158. method
  1159. local
  1160.     gin...end
  1161. names
  1162. local
  1163. 1 define method root-mean-square (s :: <sequence>)
  1164. 0      local method average (nums)
  1165. -             reduce1 (\+, nums) / size (nums)
  1166.            end average,
  1167.            method square (n)
  1168.              n * n 
  1169.            end square;
  1170. %     sqrt (average (map (square, s)))
  1171.   end method root-mean-square
  1172. $ root-mean-square (#(5, 6, 6, 7 ,4))
  1173. 5.692099788303083
  1174. define method newtons-sqrt (x)
  1175.      local method sqrt1 (guess)
  1176.               if (close? (guess))
  1177.                 guess
  1178.              else
  1179. '                sqrt1 (improve (guess))
  1180.              end if
  1181.  Lisp
  1182. )<    Smalltalk
  1183. Courier
  1184.            end sqrt1,
  1185.             method close? (guess)
  1186. ,             abs (guess * guess - x) < .0001
  1187.            end close?,
  1188. !           method improve (guess)
  1189. &             (guess + (x / guess)) / 2
  1190.            e
  1191. nd improve;
  1192.       sqrt1 (x)
  1193.    end method newtons-sqrt
  1194.  newtons-sqrt (25)
  1195. 5.000000000053723
  1196. Palatino
  1197. (Parameter Lists)
  1198. Dylan
  1199. required parameters)
  1200. rest parameters)
  1201. (keyword parameters)
  1202. next-method 
  1203. (return type declarations)
  1204. variable
  1205. specialized
  1206. (singleton specializer syntax)
  1207. variable
  1208. expression
  1209. variable
  1210.  :: singleton 
  1211. expression
  1212. informally
  1213. #rest
  1214. keyword parameter specifiers)
  1215. )`    #all-keys
  1216. #rest
  1217. #rest
  1218. Palatino
  1219. next-method 
  1220. Courier
  1221. #next
  1222. next-method
  1223. next-
  1224. method
  1225. define 
  1226. method
  1227. next-method
  1228. next-method
  1229. next-method
  1230. (Calling More General Methods)
  1231.     (a, b, c)
  1232. (a :: <list>, b, #rest c)
  1233. 0    (#rest a)
  1234. (a, b, #key foo, bar)
  1235. (#key bar, baz, bim)
  1236. (#rest all, #key fee, fi)
  1237. Argument Passing Protocol)
  1238. (accept keyword arguments)
  1239. #rest
  1240. V    #all-keys
  1241. accept all 
  1242. keyword arguments)
  1243. #rest
  1244. '(accept a variable number of arguments)
  1245. #rest
  1246. )4&(require a fixed number of arguments) 
  1247. recognize)
  1248. mandatory keywords)
  1249. Palatino
  1250. permit)
  1251. next-met
  1252. "(Specializing Required Parameters)
  1253.  identities)
  1254. specializing)
  1255. Courier
  1256. double
  1257. <number>
  1258. ) define method double (thing :: <number>)
  1259.     thing + thing
  1260.   end method
  1261.  double(10)
  1262.  double(4.5)
  1263. )S    singleton
  1264. Courier
  1265. (a :: <window>, b, c)
  1266. Palatino
  1267.  window
  1268. (a :: <window>,
  1269.  window
  1270.  b :: <character>,
  1271.  character
  1272. (a :: <window>,
  1273.  b :: <character>,
  1274.  window
  1275.  character
  1276.  c :: singleton (0))
  1277. (a, b :: <string>,
  1278.      #rest c)
  1279.  string
  1280. (a :: <vector>, b,
  1281.  #key foo, bar)
  1282.  vector
  1283. Dylan
  1284. singleton specializers)
  1285. (a :: <window>,
  1286.  b :: <character>,
  1287.  window
  1288.  character
  1289.  c == 0)
  1290. Keyword Parameters)
  1291. default
  1292. keyword parameter
  1293. keyword parameter
  1294. default
  1295. Palatino
  1296. default
  1297. default
  1298. default
  1299. Courier
  1300. default
  1301. next-
  1302. method
  1303. 7define method percolate (#key brand (#"maxwell-house"),
  1304. '                              cups (4),
  1305. 3                              strength (#"strong"))
  1306. &  make-coffee (brand, cups, strength);
  1307. end method;
  1308. 5define method layout (widget, #key position: the-pos,
  1309. 2                                   size: the-size)
  1310. %  let the-sibling = sibling (widget);
  1311. +  unless (the-pos = position (the-sibling))
  1312.     align-objects (wid
  1313. %get, the-sibling, the-pos, the-size);
  1314. end method;
  1315. (percolate (brand: #"folgers", cups: 10);
  1316. percolate (strength: #"weak",
  1317. $           brand: #"tasters-choice",
  1318.            cups: 1);
  1319. ,layout (my-widget, position: point (10, 10),
  1320. )                   size: point (30, 50));
  1321. 1layout (my-widget, size: query-user-for-size() );
  1322.     position:
  1323. position
  1324. position
  1325. position
  1326. shadow)
  1327. (Result Values)
  1328. variable-name 
  1329. type-expression
  1330. type-expression 
  1331. <object>
  1332. Palatino
  1333. variable-name 
  1334. type-
  1335. expression 
  1336. variable-name 
  1337. Courier
  1338. #rest
  1339. #rest
  1340. (rest value 
  1341. declaration)
  1342. #rest
  1343.     required 
  1344. value decla
  1345. ration)
  1346. conceptual sequence)
  1347. => #rest x :: <object>
  1348. <type-error>
  1349. <type-error>
  1350. define generic
  1351. congruency rules)
  1352. method
  1353. define method
  1354. define class
  1355. define method
  1356. define class
  1357. => #rest x :: <object>
  1358. (Parameter List Congruency)
  1359. congruent parameter lists)
  1360. Palatino
  1361. (Method Dispatch)
  1362. Palatino
  1363. (Method specificit
  1364. more specific than)
  1365. (ambiguous methods)
  1366. class precedence list)
  1367. % Computing the Class Precedence List)
  1368. Craig Chambers
  1369.  Cecil 
  1370. (U. Washington)
  1371.  CLOS 
  1372. Palatino
  1373. ambiguous method
  1374. Courier
  1375. next-method
  1376.  ambiguous next method
  1377.  (Examples of method specificity)
  1378. 4define class <sentient> (<life-form>) ... end class;
  1379. 3define class <bipedal> (<life-form>) ... end class;
  1380. 6define class <intelligent> (<sentient>) ... end class;
  1381. 2define class <humanoid> (<bipedal>) ... end class;
  1382. @define class <vulcan> (<intelligent>, <humanoid>) ... end class;
  1383. <vulcan>
  1384. <intelligent>
  1385. <humanoid>
  1386. <life-form>
  1387.     <bipedal>
  1388. <sentient>
  1389. <vulcan>
  1390. $D(<vulcan>,<intelligent>,<sentient>,<humanoid>,<bipedal>,<life-form>)
  1391. (<intelligent>,<sentient>)
  1392. (<humanoid>,<bipedal>)
  1393. <human>
  1394. ?define class <human> (<humanoid>, <intelligent>) ... end class;
  1395. <human>
  1396. C(<human>,<humanoid>,<bipedal>,<intelligent>,<sentient>,<life-form>)
  1397. \    <bipedal>
  1398. <sentient>
  1399. <vulcan>
  1400. <human>
  1401. <define class <vulcan> (<intelligent>, <humanoid>) end class;
  1402. ;define class <human> (<humanoid>, <intelligent>) end class;
  1403. 9define method psychoanalyze (being :: <intelligent>) ... 
  1404. Courier
  1405.    end method;
  1406. 6define method psychoanalyze (being :: <humanoid>) ... 
  1407.    end method;
  1408. psychoanalyze
  1409. <human>
  1410. Palatino
  1411.  being
  1412. <humanoid>
  1413. <vulcan>
  1414. being
  1415. <intelligent>
  1416. <vulcan>
  1417. being
  1418. <human>
  1419. being
  1420. superior-being
  1421. <vulcan>
  1422. being
  1423. <human>
  1424. being
  1425. superior-being
  1426. most-intelligent-being
  1427. best-looking-being
  1428. 01define method superior-being (a :: <intelligent>,
  1429. 2                              b :: <intelligent>) 
  1430.   most-intelligent-being (a, b)
  1431.   end method;
  1432. .define method superior-being (a :: <humanoid>,
  1433. .                              b :: <humanoid>)
  1434.   best-looking-being (a, b)
  1435.   end method;
  1436. $(Computing the Class Precedence List
  1437. (local precedence order) 
  1438. class precedence list)
  1439. Dylan
  1440. deterministic)
  1441. Dylan
  1442.  CLOS 
  1443. CLOS 
  1444. superior-being 
  1445. <vulcan>
  1446.  being
  1447. <human>
  1448.  being
  1449. <human>
  1450. best-
  1451. looking-being
  1452. <vulcan>
  1453. most-intelligent-being
  1454.  CLOS 
  1455. Palatino
  1456.   = {(c, c
  1457. ), (c
  1458. ), .... , (c
  1459.  ,..., c
  1460. partial class precedence list)
  1461. ,...,N
  1462. ,...,C
  1463. (N, M), 
  1464. ,....,C
  1465. Calling More General Methods)
  1466. Palatino
  1467. Courier
  1468. next-method
  1469. next-method
  1470. next-method
  1471. #next
  1472. next-method
  1473. <float>
  1474. double
  1475. next-method
  1476. next-method
  1477. <number>
  1478. & define method double (num :: <float>)
  1479. 0-    print("doubling a floating-point number")
  1480.     next-method()
  1481.   end method;
  1482. uble(10.5)
  1483. 0 doubling a floating-point number
  1484. next-method 
  1485. Next-Method
  1486. ,(Passing Different Arguments to Next-Method)
  1487. next-method
  1488. next-method
  1489. next-method
  1490.  Dylan
  1491. apply
  1492.  next-method
  1493. ext-Method
  1494. (The Next-Method Parameter)
  1495. next-method
  1496.  next-
  1497. method
  1498. next-
  1499. method
  1500. define method
  1501. method
  1502.  next-method
  1503. #next
  1504. next-method
  1505. Palatino
  1506.  next-method
  1507. Courier
  1508. define method
  1509. next-method
  1510. #Reflective Operations on Functions)
  1511. generic-function-methods
  1512. generic-function
  1513. [Function]
  1514. Symbol
  1515.   sequence
  1516. generic-function-methods
  1517. generic-function
  1518. generic-function
  1519. <sealed-object-error>
  1520. add-method
  1521. generic-function method
  1522. [Function]
  1523.   new-method old-method
  1524. add-method
  1525. generic-function
  1526. method
  1527. add-method
  1528. define method
  1529. add-method
  1530. method
  1531. method
  1532. generic-function
  1533. $generic-function-mandatory-keywords 
  1534. generic-function
  1535. [Function]
  1536. Palatino
  1537. generic-function
  1538. generic-function
  1539. generic-function
  1540. Courier
  1541. function-specializers
  1542. function
  1543. Symbol
  1544.      sequence
  1545. [Function]
  1546. function-specializers
  1547.     function 
  1548.     function 
  1549.     function 
  1550. function-arguments
  1551. function
  1552. [Function]
  1553. * required-number rest-boolean kwd-sequence
  1554. function-arguments
  1555. function
  1556.     function 
  1557.      function
  1558. function
  1559. function
  1560. function
  1561. function-arguments
  1562. applicable-method?
  1563. )        function 
  1564. #rest
  1565. sample-arguments
  1566. [Function]
  1567.       boolean
  1568. function
  1569. sample-arguments
  1570. sorted-applicable-methods
  1571. [Function]
  1572. generic-function  
  1573. #rest
  1574. sample-arguments 
  1575.   sequence1 sequence2
  1576. sorted-applicable-methods
  1577. generic-function
  1578. sample-arguments
  1579.     sequence1
  1580.     sequence2
  1581.     sequence2
  1582. Courier
  1583. find-method
  1584. Palatino
  1585. )    !generic-function specializer-list
  1586. [Function]
  1587. Symbol
  1588.   {method 
  1589. find-method
  1590. generic-function
  1591. specializer-list
  1592. generic-function
  1593. <sealed-object-error>
  1594. remove-method
  1595. generic-function method
  1596.   method
  1597. [Function]
  1598. remove-method
  1599. generic-function
  1600. method
  1601. method
  1602. generic-function
  1603. method
  1604. remove-method
  1605. generic-function
  1606. method
  1607. generic-function
  1608. <sealed-object-error>
  1609. '<function>, <generic-function>,<method>
  1610. 1(The classes <function>, <generic-function>, and 
  1611.     <method>)
  1612. <function>
  1613. [Abstract Class]
  1614. <function>
  1615. <function>
  1616. <object>
  1617. <generic-function>
  1618. [Instantiable Class]
  1619. <generic-function>
  1620. <functio
  1621. <generic-function>
  1622.     required:
  1623. number-or-sequence
  1624. <object>
  1625. rest?:
  1626. boolean
  1627. Palatino
  1628. Courier
  1629. collection-of-keywords-or-#f   
  1630. all-keys?:
  1631. boolean
  1632. rest?:
  1633. all-keys?:
  1634. add-method
  1635. define method
  1636. define 
  1637. generic
  1638. define method
  1639. <method>
  1640. [Class]
  1641. <function>
  1642. Palatino
  1643. )N    (Classes)
  1644. Introduction)
  1645. Dylan
  1646. categorize)
  1647. (slots)
  1648. Courier
  1649.     singleton
  1650. (Slots and slot access)
  1651. fields 
  1652. instance variables
  1653.     (private)
  1654. Dylan
  1655. Dylan
  1656. getter method)
  1657. setter method)
  1658. <point>
  1659. define class <point> (<object>)
  1660.   slot horizontal;
  1661.  CLOS
  1662. Courier
  1663.   slot vertical;
  1664. end class;
  1665. <point>
  1666. horizontal
  1667. vertical
  1668. Palatino
  1669. horizontal
  1670. vertical
  1671. horizontal-setter
  1672. vertical-setter
  1673. point
  1674. horizontal coordinate)
  1675. horizontal(my-point)
  1676. horizontal-setter(10, my-point)
  1677. horizontal(my-point) := 10;
  1678. (Singleton types)
  1679. 2 define method double (thing :: singleton(#"cup"))
  1680.     #"pint"
  1681.   end method
  1682.  double (#"cup")
  1683. #"pint"
  1684.  double (10)
  1685. Dylan
  1686. ' define method double (thing == #"cup")
  1687. Courier
  1688.     #"pint"
  1689.   end method
  1690.  double (#"cup")
  1691. #"pint"
  1692. Palatino
  1693. (Defining New Classes)
  1694. double
  1695. Dylan
  1696. define class
  1697. define 
  1698. adjectives
  1699. class 
  1700. class-name
  1701. superclasses  
  1702. [Definition]
  1703.              
  1704. )'    slot-spec
  1705.     slot-spec
  1706. class
  1707. class-name
  1708. define class
  1709. define class
  1710. class-name
  1711. adjectives
  1712. sealed
  1713. primary
  1714. abstract
  1715. concrete
  1716. (Controlling Dynamism)
  1717. superclass
  1718. superclass
  1719. heterarchy)
  1720.     slot-spec
  1721. slot-spec 
  1722. slot 
  1723. variable-name
  1724. -setter
  1725. slot-specs
  1726. <menu>
  1727. title
  1728. title-setter
  1729. action
  1730. action-setter
  1731. define class <menu> (<object>)
  1732.    slot title;
  1733.    slot action;
  1734. Courier
  1735.  end class;
  1736. Palatino
  1737. initialize
  1738.  (Instance creation)
  1739. (Slot Uniqueness)
  1740. )p    disjoint 
  1741. (Slot Options)
  1742. slot-specs
  1743. slot sp
  1744. ecifications)
  1745. 'initialization argument specifications)
  1746. inherited slot specifications)
  1747. (Slot Specifications)
  1748. adjectives
  1749.  ] [ 
  1750. allocation
  1751. getter-name
  1752. #key 
  1753. setter init-keyword  
  1754. #.required-init-keyword init-value init-function
  1755. getter-name 
  1756. (getter name)
  1757. adjectives
  1758. adjectives
  1759. sealed
  1760. adjectives
  1761. (Controlling Dynamism)
  1762. allocation
  1763. (Specifying 
  1764. Allocation)
  1765. Palatino
  1766. setter
  1767. init-keyword
  1768. init-value
  1769. init-function
  1770. Courier
  1771. virtual
  1772. init-value:
  1773. init-function:
  1774. (Keywords allowed in slot-
  1775. specs)
  1776. init-keyword:
  1777. required-init-keyword:
  1778. keyword 
  1779. initializable )
  1780. bar-x
  1781. bar-y
  1782. keyword initializable)
  1783. define class <bar> (<object>)
  1784.   slot bar-x, init-keyword: x:;
  1785.   slot bar-y, init-keyword: y:;
  1786. end class <bar>;
  1787. make(<bar>, x: 2, y: 3)
  1788. make(<bar>)
  1789. )j((Initialization Argument Specifications)
  1790. H    required)
  1791. )@    optional)
  1792. required keyword 
  1793. keyword 
  1794.  #key 
  1795. keyword 
  1796. )8    keyword  
  1797. #key 
  1798. type init-value init-function
  1799. )$#defaulted initialization arguments 
  1800. <bar>
  1801. Courier
  1802. define class <baz> (<bar>)
  1803.    required keyword x:;
  1804.    keyword y:, init-value: #t;
  1805. end class <baz>;
  1806. Palatino
  1807. bar-y
  1808. init-keyword
  1809. define-class
  1810. define-class
  1811. init-value:
  1812. init-function: 
  1813. required-init-keyword:
  1814. init-value:
  1815. init-function:
  1816. (Inherited Slot Specifications)
  1817. init-value:
  1818. init-function:
  1819.    inherited slot 
  1820. getter-name
  1821.  #key 
  1822. init-value init-function
  1823. getter-name
  1824. init-value:
  1825. init-function:
  1826. init-value:
  1827. init-function:
  1828. init-value:
  1829. init-function:
  1830. init-value:
  1831. init-function:
  1832. init-value:
  1833. init-function:
  1834. Courier
  1835.  define class <animal> (<object>)
  1836.   slot n-legs, init-value: 4;
  1837. end class;
  1838.  define class <spider> (<animal>)
  1839. '  inherited slot n-legs, init-value: 8;
  1840. end cl
  1841. Palatino
  1842. (Specifying Allocation)
  1843. allocation
  1844. instance
  1845. class
  1846. each-subclass
  1847. virtual
  1848. constant
  1849. instance
  1850. class
  1851. each-subclass
  1852. constant
  1853.  init-value
  1854. virtual
  1855. virtual)
  1856. Dylan
  1857. initialize
  1858. slot-initialized?
  1859. slot-
  1860. initialized?
  1861. Palatino
  1862.  (Keywords allowed in slot-specs)
  1863. Courier
  1864. setter
  1865. getter-name
  1866.     "-setter"
  1867. constant
  1868. type:
  1869. <object>
  1870. init-value:
  1871. init-value:
  1872. init-function:
  1873. init-value:
  1874. init-function:
  1875. init-function:
  1876. init-function:
  1877. init-value:
  1878. init-keyword:
  1879. init-keyword:
  1880. init-keyword 
  1881. init-keyword:
  1882. required-init-keyword:
  1883. Courier
  1884. required-init-keyword:
  1885. Palatino
  1886. init-keyword
  1887. init-
  1888. keyword:
  1889. init-keyword
  1890. required-init-keyword:
  1891. init-keyword:
  1892. init-value:
  1893. init-function:
  1894. (Filtered Slots)
  1895. position
  1896. <view>
  1897. view>
  1898. <displaced-view>
  1899. position
  1900. position
  1901. <view>
  1902. position
  1903. <displaced-view>
  1904. position
  1905. position
  1906. position-setter
  1907. <view>
  1908. <displaced-view>
  1909. <displaced-
  1910. view>
  1911. next-method
  1912. define class <view> (<object>)
  1913.   instance slot position;
  1914.   ...
  1915. end class;
  1916. &define class <displaced-view> (<view>)
  1917.   ...
  1918. end class;
  1919. .define method position (v :: <displaced-view>)
  1920. '  displace-transform (next-method (v));
  1921.  method;
  1922. 0,define method position-setter (new-position,
  1923. 5                               v :: <displaced-view>)
  1924. 7  next-method (undisplace-transform (new-position), v);
  1925. end method;
  1926. Courier
  1927. define class <shape> (<view>)
  1928.   virtual slot image;
  1929. -  instance slot cached-image, init-value: #f;
  1930.   ...
  1931. end class;
  1932. &define method image (shape :: <shape>)
  1933.   cached-image (shape)
  1934. 6    | (cached-image (shape) := compute-image (shape));
  1935. end method
  1936. 08define method image-setter (new-image, shape :: <shape>)
  1937. $  cached-image (shape) := new-image;
  1938. end method;
  1939. Palatino
  1940. (Instance creation)
  1941. initialize
  1942. (Overview)
  1943. shadow
  1944. next-method
  1945. )9"supplied initialization arguments)
  1946. )u$(defaulted initialization arguments)
  1947. Palatino
  1948. Courier
  1949. initialize
  1950. initialize
  1951. next-method()
  1952.      initargs
  1953. initialize
  1954. initialize
  1955. )3#Definitions of make and initialize)
  1956. class  
  1957. #key #all-keys
  1958. instance
  1959. [Generic Function]
  1960. class
  1961. Dylan
  1962. initialize
  1963. class
  1964. class
  1965. )0    singleton
  1966. next-method
  1967. class
  1968. #rest
  1969. !supplied-initialization-arguments
  1970. instance
  1971. [Method]
  1972. class
  1973. class
  1974.     deferred)
  1975. Palatino
  1976. "supplied-initialization-arguments 
  1977. Courier
  1978. "supplied-initialization-arguments 
  1979. class 
  1980. initialize
  1981. initialize
  1982. custom
  1983. initialize
  1984. #rest
  1985. !supplied initialization arguments
  1986. present)
  1987. initialize
  1988. initialize
  1989. instance
  1990. #key #all-keys
  1991. [Generic Function]
  1992. initialize
  1993. <triangle>
  1994. !define class <triangle> (<shape>)
  1995. .  slot side-a, required-init-keyword: side-a:;
  1996. .  slot side-b, required-init-keyword: side-b:;
  1997.   slot angle-C;
  1998. 5  virtual slot side-c, required-init-keyword: side-c:
  1999. Courier
  2000. end class <triangle>;
  2001. *define method initialize (x :: <triangle>,
  2002. 7                           #key side-a, side-b, side-c)
  2003.   next-method();
  2004. =  x.angle-C := three-sides-to-angle (side-a, side-b, side-c);
  2005. end method initialize;
  2006. initialize
  2007. Palatino
  2008. next-method
  2009. very early)
  2010. (convention)
  2011. Dylan
  2012. next-method
  2013. initialize
  2014. initialize
  2015. permits
  2016. initialize
  2017. instance
  2018. :: <object>
  2019. [Method]
  2020. initialize
  2021. initialize
  2022. next-method()
  2023. )y%(Initialization Argument Inheritance)
  2024. favorite-beverage
  2025. define class <person> (...)
  2026. %  slot favorite-beverage, init-value:
  2027.      #"milk",
  2028. 05                    init-keyword: favorite-beverage:;
  2029. )  slot name required-init-keyword: name:;
  2030. end class <person>;
  2031. #define class <astronaut> (<person>)
  2032. 1  keyword favorite-beverage: init-value: #"tang";
  2033. "  keyword name: init-value: "Bud";
  2034. end class <astronaut>;
  2035. name:
  2036. <astronaut>
  2037. name:
  2038. required-init-keyword:
  2039. required-init-keyword: 
  2040. Palatino
  2041. Courier
  2042. type:
  2043. <object>
  2044. required-init-keyword:
  2045.     optional)
  2046. init-keyword:
  2047. init-value: 
  2048. init-function:
  2049. required-init-keyword:
  2050. init-value:
  2051. init-function:
  2052. required-init-
  2053. keyword:
  2054.  init-value 
  2055. init-function 
  2056. init-
  2057. value:
  2058. init-function:
  2059. )(Initialization of Class Allocated Slots)
  2060. Palatino
  2061. Courier
  2062. class
  2063. each-subclass
  2064. init-value:
  2065. init-function:
  2066. init-value:
  2067. init-
  2068. *    function:
  2069. &(Testing the Initialization of a Slot)
  2070. slot-initialized?
  2071. instance getter
  2072. Symbol
  2073. boolean
  2074. [Function]
  2075. slot-initialized?
  2076. getter
  2077. instance
  2078. slot-initialized?
  2079. getter
  2080. instance
  2081.  (Reflective Operations on Types)
  2082.     instance?
  2083. object type
  2084.       boolean
  2085. [Function]
  2086.     instance?
  2087. object
  2088. subtype?
  2089.  type
  2090.       boolean
  2091. [Function]
  2092. subtype?
  2093. Courier
  2094. object-class
  2095. Palatino
  2096. object
  2097. Symbol
  2098.   class
  2099. [Function]
  2100. object-class
  2101. object
  2102. all-supercla
  2103. class
  2104.   sequence
  2105. [Function]
  2106. all-superclasses
  2107. class
  2108. class
  2109. <object>
  2110. class
  2111. <sealed-object-error>
  2112. direct-superclasses
  2113. class
  2114.   sequence
  2115. [Function]
  2116. direct-superclasses
  2117. class
  2118. class
  2119. define class
  2120. define class
  2121. class
  2122. <sealed-object-error>
  2123. direct-subclasses
  2124. class
  2125.   sequence
  2126. [Function]
  2127. direct-subclasses
  2128. class
  2129. class
  2130. class
  2131. <sealed-object-error>
  2132. (Coercing and Copying Objects)
  2133. shallow copies)
  2134. weak link)
  2135. Courier
  2136. Palatino
  2137. class object
  2138. Symbol
  2139.   instance
  2140. [Generic Function]
  2141. object
  2142. class
  2143. class
  2144. object
  2145. object
  2146. class
  2147. object 
  2148. <sequence>
  2149. shallow-copy
  2150. object
  2151.   new-object
  2152. [Generic Function]
  2153. shallow-copy
  2154. object
  2155. object
  2156. Dylan
  2157. <collection>
  2158. object
  2159. class-for-copy
  2160. class-for-copy
  2161. object
  2162.   class
  2163.     [Generic 
  2164. )0    Function]
  2165. class-for-copy
  2166. mutable)
  2167. class-for-
  2168. <object>
  2169. class-for-
  2170. <sequence>
  2171. explicit-key-
  2172. collection
  2173. class-for-copy
  2174. <explicit-key-collection>
  2175. class-for-copy
  2176. <type>, <class>, <singleton>
  2177. .(The classes <type>, <class>, and <singleton>)
  2178. <type>
  2179. [Abstract Class]
  2180. <type>
  2181. <class>
  2182. <type>
  2183. <type>
  2184. <object>
  2185. <class>
  2186. [Abstract Instantiable Class]
  2187. Palatino
  2188. Courier
  2189. <class>
  2190. <class>
  2191. <class>
  2192. <type>
  2193. define class
  2194. sealing directives)
  2195. <sealed-object-error>
  2196. <class>
  2197. superclasses:
  2198. superclasses:
  2199. <object>
  2200. define 
  2201. class
  2202. slots:
  2203. getter:
  2204. setter:
  2205. type:
  2206. <object>
  2207. deferred-type:
  2208. init-value:
  2209. init-
  2210.     function:
  2211. Courier
  2212. init-function:
  2213. init-value:
  2214. init-keyword:
  2215. Palatino
  2216.     required-
  2217. init-keyword:
  2218. required-init-keyword:
  2219. init-keyword
  2220. init-keyword:
  2221. init-keyword
  2222. init-
  2223. keyword:
  2224. init-value: 
  2225. init-function:
  2226. allocation:
  2227. )l    instance:
  2228. class:
  2229. each-
  2230.     subclass:
  2231.     constant:
  2232. virtual:
  2233. define 
  2234. class
  2235. adjective)
  2236. <singleton>
  2237. [Instantiable Class]
  2238. <singleton>
  2239. object:
  2240. single
  2241.     singleton
  2242. object
  2243. Symbol
  2244.   singleton
  2245. [Function]
  2246.     singleton
  2247. object
  2248. Courier
  2249. singleton(
  2250. Palatino
  2251. object
  2252. make(<singleton>, object: 
  2253. object
  2254.     8$0*
  2255. %X`PD@
  2256. 0*n=2
  2257.  !"#$
  2258. 5'4&<
  2259. * ' 6
  2260.     @R@7
  2261.  `/ 9
  2262. M0896:57;G*E1&2
  2263. '+H<3
  2264. p 0p`P    
  2265. 1.'/0J
  2266.  5 L 
  2267.  F 9@
  2268. X0l0    
  2269. ;=>&6?
  2270. 0HT    0H
  2271.  '    .!
  2272. #30'()G-H>?2$.
  2273. EFM<;
  2274. +',)/-
  2275. \(    ~0
  2276. `_@ `
  2277.  !"#$
  2278. 5'4&<
  2279. M0896:57;G*E1&2
  2280. '+H<3
  2281. 1.'/0J
  2282.     >0f0
  2283. ;=>&6?
  2284.  '    .!
  2285. #30'()G-H>?2$.
  2286. EFM<;
  2287. +',)/-
  2288.     temp.0001
  2289. Universal set
  2290. MacHTTP SoftwareFolderion 0.15
  2291. mutsumi
  2292. Mutchan
  2293. IOFST
  2294. Palatino
  2295. Courier
  2296. SymbolA
  2297. bPREC
  2298. nPRVS
  2299. zCAPN
  2300.